import http from '@/design/libs/request/request'
const BASE_URL = '/whapply'

export default {
  // 获取列表数据
  list: data => http.post(BASE_URL + '/list', data),
  // 创建数据
  create: data => http.post(BASE_URL + '/create', data),
  // 获取数据
  fetch: (id) => http.post(BASE_URL + '/fetch/' + id),
  // 更新数据
  update: data => http.post(BASE_URL + '/update', data),
  // 删除单个
  delete: (id) => http.post(BASE_URL + '/delete/' + id),
  // 删除集合
  del: data => http.post(BASE_URL + '/delete', data),
  // 更新状态
  disable: data => http.post(BASE_URL + '/disable', data),
  // 排序数据
  sort: data => http.post(BASE_URL + '/sort', data),
  // 保存申请表单
  save: data => http.post(BASE_URL + '/save', data),
  // 提交申请表单
  submit: data => http.post(BASE_URL + '/submit', data),
  // 楼层仓库树
  whroomtree: data => http.post(BASE_URL + '/whroomtree', data),
  // 仓位树
  whsitetree: data => http.post(BASE_URL + '/whsitetree', data),
  // 根据仓库获取仓位列表
  whsitesbyroomid: data => http.post(BASE_URL + '/whsitesbyroomid', data),
  // 根据仓位id获取仓位数据
  whsitebysiteid: data => http.post(BASE_URL + '/whsitebysiteid', data),
  // 仓库管理费月度分解
  whfjdetails: data => http.post(BASE_URL + '/whfjdetails', data),
  // 获取表单数据
  getformdata: data => http.post(BASE_URL + '/formdata', data),
  // 重新生成合同
  contractagain: data => http.post(BASE_URL + '/contractagain', data),
  // 发放钥匙
  grantkey: data => http.post(BASE_URL + '/grantkey', data),
  // 归还钥匙
  returnkey: data => http.post(BASE_URL + '/returnkey', data),
  // 判断是否可租
  isrentable: data => http.post(BASE_URL + '/isrentable', data)
}
